Integrand size = 29, antiderivative size = 119 \[ \int \frac {(e+f x) \sinh ^2(c+d x)}{a+i a \sinh (c+d x)} \, dx=\frac {e x}{a}+\frac {f x^2}{2 a}-\frac {i (e+f x) \cosh (c+d x)}{a d}+\frac {2 f \log \left (\cosh \left (\frac {c}{2}+\frac {i \pi }{4}+\frac {d x}{2}\right )\right )}{a d^2}+\frac {i f \sinh (c+d x)}{a d^2}-\frac {(e+f x) \tanh \left (\frac {c}{2}+\frac {i \pi }{4}+\frac {d x}{2}\right )}{a d} \]
[Out]
Time = 0.13 (sec) , antiderivative size = 119, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.207, Rules used = {5676, 3377, 2717, 3399, 4269, 3556} \[ \int \frac {(e+f x) \sinh ^2(c+d x)}{a+i a \sinh (c+d x)} \, dx=\frac {i f \sinh (c+d x)}{a d^2}+\frac {2 f \log \left (\cosh \left (\frac {c}{2}+\frac {d x}{2}+\frac {i \pi }{4}\right )\right )}{a d^2}-\frac {i (e+f x) \cosh (c+d x)}{a d}-\frac {(e+f x) \tanh \left (\frac {c}{2}+\frac {d x}{2}+\frac {i \pi }{4}\right )}{a d}+\frac {e x}{a}+\frac {f x^2}{2 a} \]
[In]
[Out]
Rule 2717
Rule 3377
Rule 3399
Rule 3556
Rule 4269
Rule 5676
Rubi steps \begin{align*} \text {integral}& = i \int \frac {(e+f x) \sinh (c+d x)}{a+i a \sinh (c+d x)} \, dx-\frac {i \int (e+f x) \sinh (c+d x) \, dx}{a} \\ & = -\frac {i (e+f x) \cosh (c+d x)}{a d}+\frac {\int (e+f x) \, dx}{a}+\frac {(i f) \int \cosh (c+d x) \, dx}{a d}-\int \frac {e+f x}{a+i a \sinh (c+d x)} \, dx \\ & = \frac {e x}{a}+\frac {f x^2}{2 a}-\frac {i (e+f x) \cosh (c+d x)}{a d}+\frac {i f \sinh (c+d x)}{a d^2}-\frac {\int (e+f x) \csc ^2\left (\frac {1}{2} \left (i c+\frac {\pi }{2}\right )+\frac {i d x}{2}\right ) \, dx}{2 a} \\ & = \frac {e x}{a}+\frac {f x^2}{2 a}-\frac {i (e+f x) \cosh (c+d x)}{a d}+\frac {i f \sinh (c+d x)}{a d^2}-\frac {(e+f x) \tanh \left (\frac {c}{2}+\frac {i \pi }{4}+\frac {d x}{2}\right )}{a d}+\frac {f \int \coth \left (\frac {c}{2}-\frac {i \pi }{4}+\frac {d x}{2}\right ) \, dx}{a d} \\ & = \frac {e x}{a}+\frac {f x^2}{2 a}-\frac {i (e+f x) \cosh (c+d x)}{a d}+\frac {2 f \log \left (\cosh \left (\frac {c}{2}+\frac {i \pi }{4}+\frac {d x}{2}\right )\right )}{a d^2}+\frac {i f \sinh (c+d x)}{a d^2}-\frac {(e+f x) \tanh \left (\frac {c}{2}+\frac {i \pi }{4}+\frac {d x}{2}\right )}{a d} \\ \end{align*}
Time = 2.45 (sec) , antiderivative size = 238, normalized size of antiderivative = 2.00 \[ \int \frac {(e+f x) \sinh ^2(c+d x)}{a+i a \sinh (c+d x)} \, dx=\frac {\left (-i \cosh \left (\frac {1}{2} (c+d x)\right )+\sinh \left (\frac {1}{2} (c+d x)\right )\right ) \left (\sinh \left (\frac {1}{2} (c+d x)\right ) \left (i (2 i+c+d x) (2 d e-c f+d f x)-4 f \arctan \left (\tanh \left (\frac {1}{2} (c+d x)\right )\right )+2 d (e+f x) \cosh (c+d x)+2 i f \log (\cosh (c+d x))-2 f \sinh (c+d x)\right )+\cosh \left (\frac {1}{2} (c+d x)\right ) \left (2 c d e-2 i c f-c^2 f+2 d^2 e x-2 i d f x+d^2 f x^2+4 i f \arctan \left (\tanh \left (\frac {1}{2} (c+d x)\right )\right )-2 i d (e+f x) \cosh (c+d x)+2 f \log (\cosh (c+d x))+2 i f \sinh (c+d x)\right )\right )}{2 a d^2 (-i+\sinh (c+d x))} \]
[In]
[Out]
Time = 2.06 (sec) , antiderivative size = 134, normalized size of antiderivative = 1.13
method | result | size |
risch | \(\frac {f \,x^{2}}{2 a}+\frac {e x}{a}-\frac {i \left (d f x +d e -f \right ) {\mathrm e}^{d x +c}}{2 a \,d^{2}}-\frac {i \left (d f x +d e +f \right ) {\mathrm e}^{-d x -c}}{2 a \,d^{2}}-\frac {2 f x}{a d}-\frac {2 f c}{a \,d^{2}}-\frac {2 i \left (f x +e \right )}{d a \left ({\mathrm e}^{d x +c}-i\right )}+\frac {2 f \ln \left ({\mathrm e}^{d x +c}-i\right )}{a \,d^{2}}\) | \(134\) |
parallelrisch | \(\frac {-4 f \left (i \cosh \left (\frac {d x}{2}+\frac {c}{2}\right )-\sinh \left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \ln \left (1-\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )\right )+4 f \left (i \cosh \left (\frac {d x}{2}+\frac {c}{2}\right )-\sinh \left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \ln \left (-i+\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\left (\left (i+i d^{2} x^{2}+\left (3-2 i\right ) x d \right ) f +2 i d^{2} e x +7 d e \right ) \cosh \left (\frac {d x}{2}+\frac {c}{2}\right )+\left (\left (-1-d^{2} x^{2}+\left (2-3 i\right ) x d \right ) f +e d \left (-2 d x +i\right )\right ) \sinh \left (\frac {d x}{2}+\frac {c}{2}\right )+\left (\left (d x -i\right ) f +d e \right ) \cosh \left (\frac {3 d x}{2}+\frac {3 c}{2}\right )+\sinh \left (\frac {3 d x}{2}+\frac {3 c}{2}\right ) \left (i d f x +i d e -f \right )}{2 d^{2} a \left (i \cosh \left (\frac {d x}{2}+\frac {c}{2}\right )-\sinh \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}\) | \(246\) |
[In]
[Out]
none
Time = 0.25 (sec) , antiderivative size = 172, normalized size of antiderivative = 1.45 \[ \int \frac {(e+f x) \sinh ^2(c+d x)}{a+i a \sinh (c+d x)} \, dx=-\frac {d f x + d e - {\left (-i \, d f x - i \, d e + i \, f\right )} e^{\left (3 \, d x + 3 \, c\right )} - {\left (d^{2} f x^{2} - d e + {\left (2 \, d^{2} e - 5 \, d f\right )} x + f\right )} e^{\left (2 \, d x + 2 \, c\right )} - {\left (-i \, d^{2} f x^{2} - 5 i \, d e + {\left (-2 i \, d^{2} e - i \, d f\right )} x - i \, f\right )} e^{\left (d x + c\right )} - 4 \, {\left (f e^{\left (2 \, d x + 2 \, c\right )} - i \, f e^{\left (d x + c\right )}\right )} \log \left (e^{\left (d x + c\right )} - i\right ) + f}{2 \, {\left (a d^{2} e^{\left (2 \, d x + 2 \, c\right )} - i \, a d^{2} e^{\left (d x + c\right )}\right )}} \]
[In]
[Out]
Time = 0.28 (sec) , antiderivative size = 224, normalized size of antiderivative = 1.88 \[ \int \frac {(e+f x) \sinh ^2(c+d x)}{a+i a \sinh (c+d x)} \, dx=\frac {- 2 i e - 2 i f x}{a d e^{c} e^{d x} - i a d} + \begin {cases} \frac {\left (\left (- 2 i a d^{3} e - 2 i a d^{3} f x - 2 i a d^{2} f\right ) e^{- d x} + \left (- 2 i a d^{3} e e^{2 c} - 2 i a d^{3} f x e^{2 c} + 2 i a d^{2} f e^{2 c}\right ) e^{d x}\right ) e^{- c}}{4 a^{2} d^{4}} & \text {for}\: a^{2} d^{4} e^{c} \neq 0 \\\frac {x^{2} \left (- i f e^{2 c} + i f\right ) e^{- c}}{4 a} + \frac {x \left (- i e e^{2 c} + i e\right ) e^{- c}}{2 a} & \text {otherwise} \end {cases} + \frac {f x^{2}}{2 a} + \frac {x \left (d e - 2 f\right )}{a d} + \frac {2 f \log {\left (e^{d x} - i e^{- c} \right )}}{a d^{2}} \]
[In]
[Out]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 238 vs. \(2 (100) = 200\).
Time = 0.25 (sec) , antiderivative size = 238, normalized size of antiderivative = 2.00 \[ \int \frac {(e+f x) \sinh ^2(c+d x)}{a+i a \sinh (c+d x)} \, dx=-\frac {1}{2} \, f {\left (\frac {2 \, x e^{\left (d x + c\right )}}{a d e^{\left (d x + c\right )} - i \, a d} + \frac {i \, d^{2} x^{2} e^{c} + i \, d x e^{c} - {\left (-i \, d x e^{\left (3 \, c\right )} + i \, e^{\left (3 \, c\right )}\right )} e^{\left (2 \, d x\right )} - {\left (d^{2} x^{2} e^{\left (2 \, c\right )} - 3 \, d x e^{\left (2 \, c\right )} + e^{\left (2 \, c\right )}\right )} e^{\left (d x\right )} + {\left (d x + 1\right )} e^{\left (-d x\right )} + i \, e^{c}}{a d^{2} e^{\left (d x + 2 \, c\right )} - i \, a d^{2} e^{c}} - \frac {4 \, \log \left ({\left (e^{\left (d x + c\right )} - i\right )} e^{\left (-c\right )}\right )}{a d^{2}}\right )} + \frac {1}{2} \, e {\left (\frac {2 \, {\left (d x + c\right )}}{a d} + \frac {-5 i \, e^{\left (-d x - c\right )} + 1}{{\left (i \, a e^{\left (-d x - c\right )} + a e^{\left (-2 \, d x - 2 \, c\right )}\right )} d} - \frac {i \, e^{\left (-d x - c\right )}}{a d}\right )} \]
[In]
[Out]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 251 vs. \(2 (100) = 200\).
Time = 0.28 (sec) , antiderivative size = 251, normalized size of antiderivative = 2.11 \[ \int \frac {(e+f x) \sinh ^2(c+d x)}{a+i a \sinh (c+d x)} \, dx=\frac {d^{2} f x^{2} e^{\left (2 \, d x + 2 \, c\right )} - i \, d^{2} f x^{2} e^{\left (d x + c\right )} + 2 \, d^{2} e x e^{\left (2 \, d x + 2 \, c\right )} - 2 i \, d^{2} e x e^{\left (d x + c\right )} - i \, d f x e^{\left (3 \, d x + 3 \, c\right )} - 5 \, d f x e^{\left (2 \, d x + 2 \, c\right )} - i \, d f x e^{\left (d x + c\right )} - d f x - i \, d e e^{\left (3 \, d x + 3 \, c\right )} - d e e^{\left (2 \, d x + 2 \, c\right )} - 5 i \, d e e^{\left (d x + c\right )} + 4 \, f e^{\left (2 \, d x + 2 \, c\right )} \log \left (e^{\left (d x + c\right )} - i\right ) - 4 i \, f e^{\left (d x + c\right )} \log \left (e^{\left (d x + c\right )} - i\right ) - d e + i \, f e^{\left (3 \, d x + 3 \, c\right )} + f e^{\left (2 \, d x + 2 \, c\right )} - i \, f e^{\left (d x + c\right )} - f}{2 \, {\left (a d^{2} e^{\left (2 \, d x + 2 \, c\right )} - i \, a d^{2} e^{\left (d x + c\right )}\right )}} \]
[In]
[Out]
Time = 1.31 (sec) , antiderivative size = 143, normalized size of antiderivative = 1.20 \[ \int \frac {(e+f x) \sinh ^2(c+d x)}{a+i a \sinh (c+d x)} \, dx=\frac {f\,x^2}{2\,a}+{\mathrm {e}}^{c+d\,x}\,\left (\frac {\left (f-d\,e\right )\,1{}\mathrm {i}}{2\,a\,d^2}-\frac {f\,x\,1{}\mathrm {i}}{2\,a\,d}\right )-{\mathrm {e}}^{-c-d\,x}\,\left (\frac {\left (f+d\,e\right )\,1{}\mathrm {i}}{2\,a\,d^2}+\frac {f\,x\,1{}\mathrm {i}}{2\,a\,d}\right )-\frac {\left (e+f\,x\right )\,2{}\mathrm {i}}{a\,d\,\left ({\mathrm {e}}^{c+d\,x}-\mathrm {i}\right )}-\frac {x\,\left (2\,f-d\,e\right )}{a\,d}+\frac {2\,f\,\ln \left ({\mathrm {e}}^{d\,x}\,{\mathrm {e}}^c-\mathrm {i}\right )}{a\,d^2} \]
[In]
[Out]